import request from '@/utils/request';
const basicURL = '/campus/campusweb';

export async function fakeAccountLogin(params) {
  return request('/api/login/account', {
    method: 'POST',
    data: params,
  });
}

export async function getFakeCaptcha(mobile) {
  return await request(`/api/login/captcha?mobile=${mobile}`);
}

// 登录得请求
export async function userLogin(params) {
  return request(`${basicURL}/ipuser/login`, {
    method: 'POST',
    data: params,
  });
}

// 动态列表数据
export async function dynamicList(params) {
  return request(`${basicURL}/menu/listOthersMenuForUser`, {
    method: 'POST',
    data: params,
  });
}

// table 列表
export async function tableList(params) {
  return request(`${basicURL}/activity/pageConditionQueryByCreatorId`, {
    method: 'POST',
    data: params,
  });
}
// table 列表删除
export async function tableListDelete(params) {
  return request(`${basicURL}/activity/batchDeleteActivity`, {
    method: 'POST',
    data: params,
  });
}

// todo 地区获取的接口
export async function regionSelection(params) {
  return request(`${basicURL}/address/queryAddressForFourLinkage`, {
    method: 'POST',
    data: params,
  });
}

// todo 保存草稿的接口
export async function saveDraft(params) {
  return request(`${basicURL}/activity/saveDrafts`, {
    method: 'POST',
    data: params,
  });
}

// todo 发布的接口
export async function addActivity(params) {
  return request(`${basicURL}/activity/addActivity`, {
    method: 'POST',
    data: params,
  });
}

// todo 活动详情
export async function queryByUpdate(params) {
  return request(`${basicURL}/activity/queryByUpdate`, {
    method: 'POST',
    data: params,
  });
}
